//
//  MutableSelectViewController.h
//  EpointFrame5
//
//  Created by Pill Gong on 14-4-18.
//  Copyright (c) 2014年 Epoint. All rights reserved.
//

#import "EpointPhoneViewController.h"

#define MutableSelectCellHeight 44.0f

@class MutableSelectViewController;

@protocol MutableSelectDataSource <NSObject>
@required

- (UITableViewCell *)mutableSelectCtrl:(MutableSelectViewController *)mutableSelectCtrl
                cellForIndexPath:(NSIndexPath *)indexPath;

- (NSInteger)mutableSelectCtrl:(MutableSelectViewController *)mutableSelectCtrl
   numberOfRowsInSection:(NSInteger)section;

@end

@protocol MutableSelectDelegate <NSObject>
@optional

- (void)mutableSelectCtrl:(MutableSelectViewController *)mutableSelectCtrl
 didSelectIndexPath:(NSIndexPath *)indexPath;

- (void)mutableSelectCtrlCancel:(MutableSelectViewController *)mutableSelectCtrl;

- (CGFloat)mutableSelectCtrl:(MutableSelectViewController *)mutableSelectCtrl
heightForRowAtIndexPath:(NSIndexPath *)indexPath;

- (void)dismissFromParentView:(MutableSelectViewController *)mutableSelectCtrl;

- (void)okButtonPressed:(NSMutableArray *)mutableArray;
- (void)backToLastView:(NSMutableArray *)selectedIndexs;

@end


@interface MutableSelectViewController : EpointPhoneViewController <UITableViewDataSource, UITableViewDelegate>

@property (nonatomic, assign) id<MutableSelectDataSource> datasource;
@property (nonatomic, assign) id<MutableSelectDelegate> delegate;

@property (nonatomic, strong) UITableView *tableView;
@property (nonatomic, strong) NSMutableArray *selectedIndexArray;

- (void)reloadTableView;

@end
